package com.congee02;

import com.congee02.spring.util.ConcurrentReferenceHashMap;

import java.lang.ref.Reference;

/**
 * @author congee(congee02 @ 163.com)
 * @date 1/28/2023 3:29 PM
 */
public class Test {

    private static final int DEFAULT_INITIAL_CAPACITY = 16;

    private static final float DEFAULT_LOAD_FACTOR = 0.75f;

    private static final int DEFAULT_CONCURRENCY_LEVEL = 16;

    private static final ConcurrentReferenceHashMap.ReferenceType DEFAULT_REFERENCE_TYPE = ConcurrentReferenceHashMap.ReferenceType.SOFT;

    private static final int MAXIMUM_CONCURRENCY_LEVEL = 1 << 16;

    private static final int MAXIMUM_SEGMENT_SIZE = 1 << 30;

    public static void main(String[] args) {
        ConcurrentReferenceHashMap<String, Object> mao =
                new ConcurrentReferenceHashMap<>(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL, ConcurrentReferenceHashMap.ReferenceType.WEAK);
        mao.put("Hello", "POT");
        mao.put("Hola", "OIU");
        System.out.println(mao);
        System.gc();
        System.out.println(mao);
    }
    
}
